PowerShell - add "display as" in contact

Hello,

Ii use this script for import my contact.

http://www.stevieg.org/2010/07/using-powershell-to-import-contacts-into-exchange-and-outlook-live/

Is it possible to add "display as" in the value ?

Thx a lot.

August 14th, 2015 9:10am

Could you give some more details as to what you're referring to? I'm not sure what you mean...
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2015 12:35pm

The script automatically populates the "FileAs" based on the value of few other attributes:

    if ($ContactItem."First Name" -and $ContactItem."Last Name")
    {
        $ExchangeContact.NickName = $ContactItem."First Name" + " " + $ContactItem."Last Name";
    }
    elseif ($ContactItem."First Name" -and !$ContactItem."Last Name")
    {
        $ExchangeContact.NickName = $ContactItem."First Name";
    }
    elseif (!$ContactItem."First Name" -and $ContactItem."Last Name")
    {
        $ExchangeContact.NickName = $ContactItem."Last Name";
    }

As you can see from the above it's a combination of the First and Last name. You can modify it as needed, or simply put a new column in the CSV file and use it to feed the FileAs value.

Same applies for the "DisplayName" field.

August 14th, 2015 3:53pm

Hi,

We are not professional about PowerShell script in this forum.

So I would like to ask author for help or post the thread in Exchange Development forum.

https://social.technet.microsoft.com/Forums/exchange/en-US/home?forum=exchangesvrdevelopment

Best Regards.

Free Windows Admin Tool Kit Click here and download it now
August 17th, 2015 3:15am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics